#include <iostream>
using namespace std;
int main()
{
	int a;
	cin >> a;
	while(a != 1)
	{
		if(a % 2 != 0)
		{
			cout << a << "*3+1="<< a * 3 + 1 << endl;
			a = a * 3 + 1;
		}
		if(a % 2 == 0)
		{
			cout << a << "/2="<< a / 2 << endl;
			a = a / 2;
		}
	}
	cout << "End" << endl;
	
	return 0;
} 
